<?php
namespace app\index\controller;
use think\Session;
use think\Db;
use think\Controller;
use app\index\model\Collect_model;
  
class Collect extends Common
{  
    // 我的收藏
    public function index()
    {
        $rev = new Collect_model;
        $res = $rev->getindex();
        // var_dump($res);die;
        return view('index@Collect/index',[
            'record' => $res['list'],
            'page' => $res['page']
        ]);
        // return $this->fetch('index@Collect/index',[
        // 	'list' => $res['list'] 
        // ]);
    }

    // 取消收藏
    public function cancel()
    {
        // var_dump($_POST);die;
        $rev = new Collect_model;
        $res = $rev->cancelcol();
        return $res;
        // var_dump($res);die;
    }

}

